home *** CD-ROM | disk | FTP | other *** search
/ Mastering Web Site Development / Microsoft Mastering Web Site Development (Microsoft) (1997).iso / Labs / Lab08 / Solution / dropclass.asp < prev    next >
Encoding:
Text File  |  1997-04-24  |  1.3 KB  |  44 lines

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2.  
  3. <HTML>
  4. <HEAD>
  5. <meta name="GENERATOR" content="Microsoft Developer Studio">
  6. <meta http-equiv="Content-Type"
  7. content="text/html; charset=iso-8859-1">
  8. <title>Class Registration</title>
  9. <link rel="STYLESHEET" href="Stylesheets/Grid/Style2.css">
  10. </head>
  11.  
  12. <body background="Images/Grid/Background/Back2.jpg"
  13. bgcolor="White">
  14. <basefont face="Arial, Helvetica, sans-serif">
  15.  
  16.  
  17. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  18.     <tr>
  19.         <th align="Left" nowrap bgcolor="Silver"
  20.         background="./Images/Grid/Navigation/Nav1.jpg"> <font
  21.         size="6"> Class Registration </font> </th>
  22.     </tr>
  23.     <tr>
  24.         <td bgcolor="#FFFFCC"> <font size="-1">  
  25.         Drop a Class</font> </td>
  26.     </tr>
  27. </table>
  28.  
  29.  
  30. <%    lngStudentID = session("id")
  31.     strClassID = request("classid")
  32.     Set EnrollObj = Server.CreateObject("StateU.Enrollment")
  33.     errEnrollment = EnrollObj.Drop(lngStudentID,strClassID)
  34.  
  35.     If errEnrollment = 1 Then
  36.         response.write "An error occurred and the class could not be added. Be sure that you are using a valid student ID and that you are not dropping from a class that has already been graded."
  37.         response.end
  38.     End If
  39.  
  40. %>
  41. Student <%=lngStudentID%> has been dropped from class <%=strClassID%>
  42. </BODY>
  43. </HTML>
  44.